package com.i2863.shiroDemo.util;

import java.util.UUID;

/**
 * @author cexy
 * @date 2021/5/17 10:38
 * @description
 **/
public class UUIDUtil {

    /**
     * 随机生成指定长度的大写的uuid
     *
     * @param length 长度
     * @return uuid
     */
    public static String randomUpper(int length) {
        String uuid = UUID.randomUUID().toString().replace("-", "");
        return uuid.toUpperCase().substring(0, length);
    }

}
